﻿using LightCAD.Core;
using SkiaSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using LightCAD.Runtime;
using static LightCAD.Runtime.Constants;
using System.Xml.Linq;
using System.Runtime.CompilerServices;
using LightCAD.Core.Elements;
using LightCAD.Runtime.Interface;

namespace LightCAD.Drawing.Building
{
    public class BuildingAction
    {
        protected DocumentRuntime docRt;
        public LcDocument lcDocument;
        protected ViewportRuntime vportRt;
        public BuildingAction(DocumentRuntime docRt)
        {
            this.docRt = docRt;
            this.vportRt = docRt.DrawingEditRt.ActiveViewportRt;
            this.lcDocument = docRt.Document;
        }
        public LcBuilding lcBuilding;
        public async void ExecCreate(string[] args)
        {
            var pointInputer = new PointInputer(this.docRt);
            var elementSetInputer = new ElementSetInputer(this.docRt);

            var win = (IBuildingWindow)AppRuntime.UISystem.CreateWindow("BuildingSettingWindow", this);
            var result = AppRuntime.UISystem.ShowDialog(win);
            if (result == LcDialogResult.OK)
            {
                lcBuilding = win.lcBuilding;
            }
        }
    }
}
